/*
	@file: log/include/LogStream.h
	@author: Wolfhead
*/
#ifndef _LOG_LOG_STREAM_H_
#define _LOG_LOG_STREAM_H_

#include <sstream>
#include <boost/noncopyable.hpp>
#include <boost/call_traits.hpp>
#include "LogPriority.h"
#include "LogContext.h"
#include "LogData.h"


namespace logger
{

class LogStream
	: public boost::noncopyable
{
public:

	LogStream(
		LogPriority priority,
		LogContext context
		);

	LogStream(
		const std::string& name,
		LogContext context);

	~LogStream();

	std::ostringstream& Stream() {return m_stream;}

	bool priority_is_set();

private:

	LogPriority m_priority;
	LogDataPtr  m_data_ptr;

	std::ostringstream m_stream;
};

}//namespace logger


#endif //#ifndef _LOG_LOG_STREAM_H_
